import { request } from '@/utils/request';

const Api = {
  list: '/nursing_plan/list',
  save: '/nursing_plan/save',
  findById: '/nursing_plan/findById',
  update: '/nursing_plan/edit',
  delete: '/nursing_plan/del',
  enable: '/nursing_plan/enable'
};

export function getList(params:{}) {
  return request.get({
    url: Api.list,
    params: params
  });
}

export function saveNursingPlan(obj: {}) {
  return request.post({
    url: Api.save,
    params: obj
  })
}

export function findById(id) {
  return request.get({
    url: Api.findById+"/"+id
  })
}

export function updateById(params) {
  return request.put({
    url: Api.update,
    params: params
  })
}

export function deleteById(id) {
  return request.delete({
    url: Api.delete + "/" + id
  })
}

export function enableProject(params) {
  return request.get({
    url: Api.enable + "/" + params.id + "/" + params.status
  })
}